import QtQuick 2.6
import Qt.labs.controls 1.0
import QtQuick.XmlListModel 2.0
import "../template" as Tm
Tm.Navigator {
    id: nav

    title: "我的测试记录"
    ListView{
        id: listView
        anchors.fill: parent
        delegate: ItemDelegate{
            width: listView.width
            text: "第" + times + "次测试"
            onClicked: contentArea.push(Qt.resolvedUrl("../qml/TestHistoryContentNavigator.qml"), {title: text,
                                        uid: usinfo.id, times: times})
        }

        model:    XmlListModel {
            id: xmlModel
            source: http.build("/test/record.xml?t=g", {uid: usinfo.id})
            query: "/record/times"

            XmlRole { name: "times"; query: "string()" }
        }
    }
}
